package day0814;

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String high = "bdfhkl";
        String mid = "aceimnorstuvwxz";
        String low = "gjpqy";
        StringBuilder high1 = new StringBuilder();
        StringBuilder mid1 = new StringBuilder();
        StringBuilder low1 = new StringBuilder();
        for(int i=0;i<str.length();i++){
            char c = str.charAt(i);
            if(high.contains(Character.toString(c))){
                high1.append(c);
            }else if(mid.contains(Character.toString(c))){
                mid1.append(c);
            }else if(low.contains(Character.toString(c))){
                low1.append(c);
            }
        }
        String high2 = high1.toString();

        char[] h =high2.toCharArray();
        Arrays.sort(h);
        String mid2 = mid1.toString();
        char[] m =mid2.toCharArray();
        Arrays.sort(m);
        String low2 = low1.toString();
        char[] lo =low2.toCharArray();
        Arrays.sort(lo);
////
//        String h2 = new String(h);
//        String m2 = new String(m);
//        String lo2 = new String(lo);
        if(h.length == 0 ){
            System.out.println("null");
        }else{
            System.out.println(h);
        }
        if(m.length == 0 ){
            System.out.println("null");
        }else{
            System.out.println(m);
        }
        if(lo.length == 0 ){
            System.out.println("null");
        }else{
            System.out.println(lo);
        }

    }
}
